package main

func numWaterBottles(numBottles int, numExchange int) int {
	// 初始化为 满瓶数量
	rst := numBottles
	// 开始循环
	for numBottles >= numExchange {
		rst += numBottles / numExchange
		numBottles = numBottles%numExchange + numBottles/numExchange
	}
	return rst
}
